<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者，助力中小企业发展 
// +----------------------------------------------------------------------
// | Copyright (c) 2017～2024  www.wdadmin.cn    All rights reserved.
// +----------------------------------------------------------------------
// | Wdadmin系统产品软件并不是自由软件，不加密，并不代表开源，未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn>   www.wdadmin.cn
// +----------------------------------------------------------------------

namespace app\admin\validate\wddj\operation;

use think\Validate;

class CostAllocation extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'mileage_price'=>'require',
        'mileage_fee_start_time'=>'require',
        'mileage_fee_end_time'=>'require',
        'long_distance_price'=>'require',
        'capped_price'=>'require',
        'exceeding_kilometers'=>'require',
        'long_distance_fee_start_time'=>'require',
        'long_distance_fee_end_time'=>'require',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'mileage_price.require'     => '请输入里程费价格',
        'mileage_fee_start_time.require'     => '请选择里程费开始时间',
        'mileage_fee_end_time.require'     => '请选择里程费开始时间',
        'long_distance_price.require'     => '请输入远途费价格',
        'capped_price.require'     => '请输入封顶价格',
        'exceeding_kilometers.require'     => '请输入远途费超出公里',
        'long_distance_fee_start_time.require'     => '请选择远途费开始时间',
        'long_distance_fee_end_time.require'     => '请选择远途费开始时间',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['mileage_price','mileage_fee_start_time','mileage_fee_end_time',
            'long_distance_price','capped_price','exceeding_kilometers','long_distance_fee_start_time','long_distance_fee_end_time'],
        'edit'  => ['mileage_price','mileage_fee_start_time','mileage_fee_end_time',
            'long_distance_price','capped_price','exceeding_kilometers','long_distance_fee_start_time','long_distance_fee_end_time'],
    ];
    
}
